<{extends file="../Share/_FrontLayout.tpl"}>
<{block name="content"}>
    <{include file="Index_ScrollPictures.tpl"}>
    <div class="content-resource-left">
        <{include file="Index_Content_Center.tpl"}>
    </div>
    <div class="content-resource-center">
        <{*<{include file="Index_Content_Center.tpl"}>*}>
        <{include file="Index_Content_Left.tpl"}>
    </div>
    <div class="content-resource-right">
        <{include file="Index_Content_Right.tpl"}>
    </div>
    <div class="clearfix"></div>
    <div class="friend-link">
        <{include file="Index_FriendLink.tpl"}>
    </div>
<{/block}>
<{block name="script"}>
    <script>
        $(document).ready(function() {
            autoImg();
        });

        function autoImg() {
            var Index = 1;
            var Len = $(".H_banner_imgs a").length;
            if (Len > 1) {
                //生成数字
                for (var i = 1; i <= Len; i++) {
                    $(".H_banner_imgs p").html($(".H_banner_imgs p").html() + "<i>" + i + "</i>");
                }
                //自动开始
                var myInt = setInterval(function() {
                    imgShow(Index);
                    Index++;
                    if (Index == Len) {
                        Index = 0;
                    }
                }, 5000);
                //数字触发
                $(".H_banner_imgs p i").hover(function() {
                    clearInterval(myInt);
                    var n = $(".H_banner_imgs p i").index(this);
                    imgShow(n);
                    n++;
                    if (n == Len) {
                        n = 0;
                    }
                    Index = n;
                }, function() {
                    myInt = setInterval(function() {
                        imgShow(Index);
                        Index++;
                        if (Index == Len) {
                            Index = 0;
                        }
                    }, 5000);
                });
            }
            //动画函数

            function imgShow(i) {
                $(".H_banner_imgs p i").removeClass("hover");
                $(".H_banner_imgs p i").eq(i).addClass("hover");
                $(".H_banner_imgs a:visible").fadeOut("slow");
                $(".H_banner_imgs a").eq(i).fadeIn("slow");
            }
        }
        //首页大图滚动
    </script>
<{/block}>
